@import 'lib.styl';
@import 'base-config.styl';

// 布局
m-init-wrap(){
  width $wrap-scale
  max-width $max-wrap
  min-width $min-wrap
}

// 主安全
main-wrap($h = '') {
  width: 100%;

  if ($h) {
    height: $h;
  } else {
    height: auto;
  }

  {block};
}

// 主内容
main-container($w) {
  m-init-wrap()
  margin: 0 auto;
  {block};
}


scrollbar() {
  $base = $primary + #b8621f; // 基本颜色

  &::-webkit-scrollbar {
    width: 8px;
    background: lighten($base, 50%);
  }

  &::-webkit-scrollbar-thumb {
    background: darken($base, 30%);
    border-radius: 8px;
  }
}

// 悬浮的mixin
m-hover($model) {
  &:hover {
    color: f-hover($model);
    {block};
  }
}

pointer() {
  &:hover {
    cursor: pointer;
    {block};
  }
}

disabled() {
  &:hover {
    cursor: not-allowed;
    {block};
  }
}
